package kr.saeildamil.androidstudy.ch07;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.View;

public class MyView02 extends View{
	public MyView02(Context context){
		super(context);
	}
	
	@Override
	protected void onDraw(Canvas canvas) {
		canvas.drawColor(Color.LTGRAY);
		Paint pnt = new Paint(Paint.ANTI_ALIAS_FLAG);
		
		pnt.setStrokeWidth(8);
		pnt.setColor(Color.RED);
		
		pnt.setStyle(Paint.Style.FILL);
		canvas.drawCircle(50, 50, 40, pnt);
		
		pnt.setStyle(Paint.Style.STROKE);
		canvas.drawCircle(150, 50, 40, pnt);
		
		pnt.setStyle(Paint.Style.FILL_AND_STROKE);
		canvas.drawCircle(250, 50, 40, pnt);
		
		pnt.setColor(Color.BLUE);
		pnt.setStyle(Paint.Style.FILL);
		canvas.drawCircle(50, 150, 40, pnt);
		pnt.setColor(Color.RED);
		pnt.setStyle(Paint.Style.STROKE);
		canvas.drawCircle(50, 150, 40, pnt);
		
		pnt.setColor(Color.RED);
		pnt.setStyle(Paint.Style.STROKE);
		canvas.drawCircle(150, 150, 40, pnt);
		pnt.setColor(Color.BLUE);
		pnt.setStyle(Paint.Style.FILL);
		canvas.drawCircle(150, 150, 40, pnt);
	}
}
